ns-3 installation
Ubuntu
environment
ns-3: v3.29
OS: Ubuntu16.04 (in docker)
TL;DR
code: shell
apt-get update
apt-get install -y gcc g++
apt-get install -y python python-dev
apt-get install -y mercurial python-setuptools git
apt-get install -y qt4-dev-tools libqt4-dev
apt-get install -y cmake libc6-dev libc6-dev-i386 g++-multilib
apt-get install -y gdb valgrind
apt-get install -y gsl-bin libgsl2 libgsl-dev
apt-get install -y flex bison libfl-dev
apt-get install -y tcpdump
apt-get install -y sqlite sqlite3 libsqlite3-dev
apt-get install -y libxml2 libxml2-dev
apt-get install -y libgtk2.0-0 libgtk2.0-dev
apt-get install -y vtun lxc
apt-get install -y uncrustify
apt-get install -y doxygen graphviz imagemagick
apt-get install -y texlive texlive-extra-utils texlive-latex-extra texlive-font-utils texlive-lang-portuguese dvipng
apt-get install -y python-sphinx dia
apt-get install -y python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev ipython
apt-get install -y libboost-signals-dev libboost-filesystem-dev
apt-get install -y openmpi-bin openmpi-common openmpi-doc libopenmpi-dev
cd ~
tar xjf ns-allinone-3.29.tar.bz2
cd ns-allinone-3.29/ns-3.28
./waf distclean
./waf configure --enable-sudo -d optimized
./waf -j4
MacOS
environment
ns-3: v3.29
OS: macOS Mojave 10.14.4
TL;DR
code: shell
# install libxml2
brew install libxml2
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
# install ns-3
tar xf ns-allinone-3.29.tar.bz2
cd ns-allinone-3.29/ns-3.29
./waf configure --disable-werror
./waf -j4
# run example
cp examples/tutorial/first.cc scratch/myfirst.cc
./waf
./waf --run scratch/myfirst
errors
description: libxml not found
message: ../src/config-store/model/xml-config.h:25:10: fatal error: 'libxml/xmlwriter.h' file not found
solution:
code: shell
brew install libxml2
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
refences
description: unused typedef 'F'
message: ./ns3/make-event.h:665:20: error: unused typedef 'F' [-Werror,-Wunused-local-typedef]
solution:
code:shell
./waf configure --disable-werror
references:
resources